/*
 * @Descripttion: 
 * @Author: zhangchong zc16607@gmail.com
 * @Date: 2023-02-27 16:08:44
 * @LastEditors: zhangchong zc16607@gmail.com
 * @LastEditTime: 2023-04-14 17:39:20
 */

const login = require('./login.router')
const account = require('./thirdPartAccount.route')
const sitemanage = require('./site.router')
const configmanage = require('./config.route')
const content = require('./content.router')


const routerConf = [
  { path: '/api', router: login },
  { path: '/api', router: account },
  { path: '/api', router: sitemanage },
  { path: '/api', router: configmanage },
  { path: '/api', router: content },
]

function routes(app) {
  // 根目录
  app.get('/', (req, res) => res.status(200).send({ word: 'Hello World !!!' }))

  routerConf.forEach((conf) => app.use(conf.path, conf.router))
}

module.exports = routes